package com.imooc.collection;

import java.util.HashSet;
import java.util.Set;

/**
 * @author duyong
 * @version 1.0
 * @date 2019/10/23 16:00
 */
//学生类
public class Student {
    private String id;
    private String name;
    //Set 不能有重复的
    private Set courses;

    //构造器
    public Student(String id, String name, Set courses) {
        this.id = id;
        this.name = name;
        //不能直接实例化接口 通过hashSet实现类
        this.courses = new HashSet(courses);
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Set getCourses() {
        return courses;
    }

    public void setCourses(Set courses) {
        courses = courses;
    }
}
